// -----------------------------
// Author: 		Dhaenens Gert 
// Creation: 	9/19/2014 9:37:39 PM				
// -----------------------------

#ifndef _Actor_h
#define _Actor_h

#include "Common.h"

class Application;
class Scene;

class Actor
{
public:
	friend class Scene;

	typedef enum ActorFlags
	{
		Geometry	= 0x0001,
		Camera		= 0x0002,
		Light		= 0x0004,
	};

	virtual ~Actor();

	virtual void	Update(Application* lpApp, Float deltaTime);

	Bool			HasFlags(UInt32 flags) const;

	void			SetPosition(const Vector3& pos);
	void			SetRotation(const Matrix& rot);
	void			SetScale(const Matrix& scale);
	void			SetEnabled(Bool bEnabled);
	void			SetLookAt(const Vector3& LookAt);

	const TString&	GetName() const;

	Vector3			GetPosition() const;
	Matrix			GetRotation() const;
	Matrix			GetScale() const;
	Matrix			GetWorld() const;
	Bool			GetEnabled() const;

	Vector3			GetForward() const;
	Vector3			GetRight() const;
	Vector3			GetUp() const;

protected:
	Actor(const TString& Name, const UInt32 Flags);

	TString			m_Name;
	Scene*			m_lpScene;
	Vector3			m_Position;
	Matrix			m_Rotation;
	Matrix			m_Scale;
	Bool			m_bEnabled;
	const UInt32	m_Flags;

private:
	Actor(const Actor& refActor);
	Actor& operator=(const Actor& refActor);
};

#endif